In digital video, compression is used for conserving storage and for realtime downloading and viewing over the Internet. A technique used in digital video compression is block motion estimation. With block motion estimation, blocks of video samples in frames of a video stream are matched with similar blocks of video samples from adjoining frames in a sequence, such as the previous frame and the next frame.
These blocks correspond to similar sets of pixels that represent an image element in the scene captured in the frame, such as a foreground or background object, or a feature from the area of interest. From frame to frame, these blocks typically change as movement occurs in the scene, and this is represented by motion vectors associated with the blocks within the frame.
In block motion estimation, the best matches are found for blocks in each successive frame so that maximum correlation is found across blocks in consecutive frames. A small dataset representing block-to-block sample differences and the motion vectors are encoded and transmitted to the decoder. In a practical realization, a sum of the absolute video sample differences (SAD) is found and a minimum number of such SAD values is determined for a large set of candidate blocks over a range of video frames to be encoded. Block matching results in a high degree of coding efficiency, which is effectively realized as data compression.
However, motion estimation is a computationally-intensive task, which poses a problem for webcams, for example, used for realtime communications over the Internet. To off-load the computation, some current webcams include a processor that performs pre-processing on video samples prior to sending to the host computer (e.g., via a USB connection). Pre-processing can be performed for basic parameters such as luminance and chrominance samples and also for more complex supporting features such as face tracking. However, the pre-processing is limited in that the webcam generates specific motion vectors which are only used in the system to support these functions.